import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  base: '/',//这样可以去除url中的#
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/banner'
    },
    {
      path: '/',
      component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
      meta: { title: '自述文件' },
      children: [


        {
          // banner图
          path: '/banner',
          name: 'banner',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/banner.vue'),
          meta: { title: 'banner图' }
        },
        {
          // banner图
          path: '/pay',
          name: 'pay',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/pay.vue'),
          meta: { title: '支付配置' }
        },
        {
          // 兑换管理
          path: '/cash',
          name: 'cash',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/cash.vue'),
          meta: { title: '兑换管理' }
        },
        {
          // 兑换商品
          path: '/award',
          name: 'award',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/award.vue'),
          meta: { title: '兑换商品' }
        },
        {
          // 提现管理
          path: '/deposit',
          name: 'deposit',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/deposit.vue'),
          meta: { title: '提现管理' }
        },

        {
          // 视频管理
          path: '/video',
          name: 'video',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/video.vue'),
          meta: { title: '视频管理' }
        },

        {
          // 短信配置
          path: '/sms',
          name: 'sms',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/config/sms.vue'),
          meta: { title: '短信配置' }
        },
        {
          // 其他配置
          path: '/other',
          name: 'other',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/config/other.vue'),
          meta: { title: '其他配置' }
        },
        {
          // 收款配置
          path: '/pay',
          name: 'pay',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/config/pay.vue'),
          meta: { title: '收款配置' }
        },

        {
          // 用户列表
          path: '/user',
          name: 'user',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/user.vue'),
          meta: { title: '用户列表' }
        },
        {
              // 用户列表
              path: '/app_qr',
              name: 'app_qr',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/app_qr.vue'),
              meta: { title: '登录二维码' }
        },
        {
              // 用户列表
              path: '/user_red',
              name: 'user_red',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/user_red.vue'),
              meta: { title: '红包管理' }
        },
        {
              // 用户列表
              path: '/user_red_log',
              name: 'user_red_log',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/user_red_log.vue'),
              meta: { title: '用户红包记录' }
         },
        // {
        //       // 用户列表
        //       path: '/user_coupon',
        //       name: 'user_coupon',
        //       component: () => import(/* webpackChunkName: "drag" */ '../components/page/user_coupon.vue'),
        //       meta: { title: '优惠卷管理' }
        // },

        {
          // 报单管理
          path: '/report',
          name: 'report',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/report.vue'),
          meta: { title: '报单管理' }
        },
        {
          // 拼团订单
          path: '/group-order',
          name: 'group-order',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/group-order.vue'),
          meta: { title: '拼团订单' }
        },
        {
            // 拼团订单
            path: '/qiugou',
            name: 'qiugou',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/qiugou.vue'),
            meta: { title: '求购订单' }
        },
        {
            // 拼团订单
            path: '/jishi',
            name: 'jishi',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/jishi.vue'),
            meta: { title: '集市订单' }
        },
        {
            // 拼团订单
            path: '/guess',
            name: 'guess',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/guess.vue'),
            meta: { title: '用户竞猜' }
        },
        {
            // 拼团订单
            path: '/guess_log',
            name: 'guess_log',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/guess_log.vue'),
            meta: { title: '竞猜历史' }
        },
        {
          // 拼团分类
          path: '/pcate',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/pcate.vue'),
          meta: { title: '拼团分类' }
        },
        {
          // 商品
          path: '/goods',
          name: 'goods',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/goods/goods.vue'),
          meta: { title: '商品列表' }
        },
        {
          // 广告类型
          path: '/type',
          name: 'type',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/adv/type.vue'),
          meta: { title: '广告类型' }
        },
        {
          // 每日任务
          path: '/day',
          name: 'day',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/adv/day.vue'),
          meta: { title: '每日任务' }
        },
        {
          // 拼团
          path: '/group',
          name: 'group',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/goods/group.vue'),
          meta: { title: '拼团列表' }
        },
        {
          // 等级
          path: '/level',
          name: 'level',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/level.vue'),
          meta: { title: '等级列表' }
        },
        {
          // 拼团奖励配置
          path: '/group-conf',
          name: 'group-conf',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/config/group.vue'),
          meta: { title: '拼团奖励配置' }
        },
        {
          // 公告
          path: '/notice',
          name: 'notice',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/notice.vue'),
          meta: { title: '公告' }
        },
        {
          // 地区管理
          path: '/areas',
          name: 'areas',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/config/areas.vue'),
          meta: { title: '地区管理' }
        },
        {
          // 地区管理
          path: '/recharge',
          name: 'recharge',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/recharge.vue'),
          meta: { title: '余额充值' }
        },
       /* {
          // 地区管理
          path: '/rechargebuc',
          name: 'rechargebuc',
          component: () => import(/!* webpackChunkName: "drag" *!/ '../components/page/new/rechargebuc.vue'),
          meta: { title: 'buc充值记录' }
        },
        {
          // 地区管理
          path: '/totalbuc',
          name: 'totalbuc',
          component: () => import(/!* webpackChunkName: "drag" *!/ '../components/page/new/totalbuc.vue'),
          meta: { title: 'buc总数记录' }
        },*/
        {
          // 地区管理
          path: '/coinlist',
          name: 'coinlist',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/coinlist.vue'),
          meta: { title: '积分记录' }
        },
        {
          // 地区管理
          path: '/balancelist',
          name: 'balancelist',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/balancelist.vue'),
          meta: { title: '余额记录' }
        },
          {
              // 地区管理
              path: '/commission_list',
              name: 'commission_list',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/commission_list.vue'),
              meta: { title: '返佣记录' }
          },
          {
              // 地区管理
              path: '/lock_list',
              name: 'lock_list',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/lock_list.vue'),
              meta: { title: '锁定记录' }
          },
   /*     {
          // 地区管理
          path: '/buclist',
          name: 'buclist',
          component: () => import(/!* webpackChunkName: "drag" *!/ '../components/page/new/buclist.vue'),
          meta: { title: 'buc记录' }
        },*/
        {
          // 管理员
          path: '/admins',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/admins.vue'),
          meta: { title: '管理员' }
        },
        {
          // 管理员
          path: '/article',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/new/article.vue'),
          meta: { title: '文章管理' }
        },
        {
          // 角色
          path: '/role',
          component: () => import(/* webpackChunkName: "drag" */ '../components/page/role.vue'),
          meta: { title: '角色管理' }
        },
        {
            // 角色
            path: '/apis',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/apis.vue'),
            meta: { title: '接口管理' }
        },
        {
          path: '/404',
          component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
          meta: { title: '404' }
        },
        {
          path: '/403',
          name: '403',
          component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
          meta: { title: '403' }
        },




          {
              path: '/game',
              name: 'game',
              component: () => import( '../components/page/game/game.vue'),
              meta: { title: '游戏管理' }
          },
          {
              path: '/sell',
              name: 'sell',
              component: () => import( '../components/page/sell/sell.vue'),
              meta: { title: '出售管理' }
          },
          {
          // 订单管理
              path: '/zl_game_order',
              name: 'zl_game_order',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/zl_game_order.vue'),
              meta: { title: '租赁订单' }
          },
          {
              // 订单管理
              path: '/dl_game_order',
              name: 'dl_game_order',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/dl_game_order.vue'),
              meta: { title: '代练订单' }
          },
          {
              // 订单管理
              path: '/shop_game_order',
              name: 'shop_game_order',
              component: () => import(/* webpackChunkName: "drag" */ '../components/page/shop_game_order.vue'),
              meta: { title: '商城订单' }
          },
          {
            // 订单管理
            path: '/payment-statment',
            name: 'payment-statment',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/payment_statment.vue'),
            meta: { title: '对账单' }
          },
          {
            // 代练申请
            path: '/dailian_apply',
            name: 'dailian_apply',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/dailian_apply.vue'),
            meta: { title: '代练申请' }
          },
            {
            // 订单管理
            path: '/device-list',
            name: 'device-list',
            component: () => import(/* webpackChunkName: "drag" */ '../components/page/device_list.vue'),
            meta: { title: '对账单' }
          },
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
      meta: { title: '登录' }
    },
    {
      path: '*',
      redirect: '/404'
    }
  ]
});
